﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace xDataSet
{
    public static class Config
    {
        /// <summary>
        /// 存放业务DLL的文件夹路径  默认是当前程序目录
        /// </summary>
        public static string DLLFloderPath { get; set; }

        /// <summary>
        /// 运行环境
        /// windows
        /// linux
        /// </summary>
        public static string RunEnvironment { get; set; }


        /// <summary>
        /// redis缓存库编号
        /// </summary>
        private static int _redisCacheDBNo;
        public static int RedisCacheDBNo
        {
            get { return _redisCacheDBNo; }
            set { _redisCacheDBNo = value; }
        }

        private static int _redisDBNo;
        /// <summary>
        /// 使用的redis数据库编号
        /// </summary>
        public static int RedisDBNo
        {
            get { return _redisDBNo; }
            set { _redisDBNo = value; }
        }

        /// <summary>
        /// 登录以后保存用户信息数据库编号
        /// </summary>
        private static int _loginStateDBNo;

        public static int LoginStateDBNo
        {
            get { return Config._loginStateDBNo; }
            set { Config._loginStateDBNo = value; }
        }

        /// <summary>
        /// 登录以后保存用户信息缓存时间 单位：小时  默认一个月
        /// </summary>
        private static double _loginStateCacheTimeOut;

        public static double LoginStateCacheTimeOut
        {
            get { return Config._loginStateCacheTimeOut; }
            set { Config._loginStateCacheTimeOut = value; }
        }

        private static string _redisPswd;
        /// <summary>
        /// redis数据库密码 暂时不写
        /// </summary>
        public static string RedisPswd
        {
            get { return _redisPswd; }
            set { _redisPswd = value; }
        }

        /// <summary>
        /// 服务器连接
        /// </summary>
        private static string _redisServer;
        /// <summary>
        /// redis服务器连接
        /// </summary>
        public static string RedisServer
        {
            get { return _redisServer; }
            set { _redisServer = value; }
        }

        private static int _redisPort;
        /// <summary>
        /// redis数据库端口
        /// </summary>
        public static int RedisPort
        {
            get { return _redisPort; }
            set { _redisPort = value; }
        }

        /// <summary>
        /// 缓存保存时间  单位小时
        /// </summary>
        private static double _cacheExpireTime;
        public static double CacheExpireTime
        {
            get { return _cacheExpireTime; }
            set { _cacheExpireTime = value; }
        }
    }
}
